# -*- mode: snippet -*-
# name: shiny server validate input
# key: shiny.server.validate.input
# key: shiny_server_validate_input
# key: validate_input_shiny_server
# contributor: Shuguang Sun
# --
if (input$x < 0 && input$trans %in% c("log", "square-root")) {
  validate("x can not be negative for this transformation")
}